package com.hxgis.common.enums;

import lombok.Getter;

import java.util.Objects;

/**
 * @author cqj
 * @version 1.0
 * @date 2019/10/28 15:11
 */
@Getter
public enum SplashColorEnum {
    QH_BAOYU("BAOYU","163,249,222;104,231,246;81,195,247;45,145,239;67,103,242;103,55,229",""),
    QH_PRE("QH_PRE","163,249,222;104,231,246;81,195,247;45,145,239;67,103,242;103,55,229",""),
    QH_PRE_24H("QH_PRE_24H","255,255,255;166,242,143;61,186,61;97,184,255;0,0,255;250,0,250;128,0,64",""),
    QH_PRE_ANOMALY("QH_PRE_ANOMALY","194,27,66;255,10,46;250,111,46;251,195,108;250,251,217;104,231,246;81,195,247;45,145,239;67,103,242;103,55,229","历史距平百分率"),
    QH_PRE_DAYS("QH_PRE_DAYS","163,249,222;104,231,246;81,195,247;45,145,239;67,103,242;103,55,229",""),
    QH_PRE_DAYDISTANCE("QH_PRE_DAYDISTANCE","194,27,66;255,10,46;250,111,46;251,195,108;250,251,217;104,231,246;81,195,247;45,145,239;67,103,242;103,55,229","历史距平"),
    ;


    private String flag;

    private String splashColorType;

    private String message;


    SplashColorEnum( String flag, String splashColorType, String message) {
        this.flag = flag;
        this.splashColorType = splashColorType;
        this.message = message;
    }


    public static SplashColorEnum getSplashColorEnum(String flag) {
        SplashColorEnum[] values = SplashColorEnum.values();
        for (SplashColorEnum value : values) {
            if (Objects.equals(value.getFlag(),flag)){
                return value;
            }
        }
        return null;
    }
}
